EMT Practice Test
1. Question Content...
Question1: Use advanced inventory variables in a playbook.
Question2: Override the SSH port for web1 in the host_vars/web1.yml file.
Question3: Generate a list of numbers from 1 to 10 using filters.
Question4: Validate the EE configuration using Ansible Builder.
Question5: Create a playbook to run only tasks tagged as install.
Question6: Use group variables in a playbook to configure web servers.
Question7: Convert a list of dictionaries into a single dictionary.
Question8: Test the inventory in Automation Controller.
Question9: Push the EE image to a private container registry.
Question10: Sort a dictionary by its keys using a filter and display the result.
Question11: Use a source control credential in a project in Automation Controller.
Question12: Upload the EE to Red Hat Automation Hub.
Question14: Transform a list of strings to uppercase using a filter and display the result.
Question15: Test the webserver role from the collection using ansible-playbook.
Question16: Set up a directory for multiple host variable files for all managed hosts.
Question17: Use delegation to upload a file to an S3 bucket from the control node.
Question18: Verify that an EE supports a specific Ansible version.
Question19: Gather facts for web1 but delegate the task to the control node.
Question21: Use a survey to capture runtime inputs for a job template.
Question23: Trigger a playbook run using the Automation Controller API.
Question24: Automate inventory updates with a cron job.
Question25: Check if a variable is a list and fail if it is not.
Question26: Sync dynamic inventory with Automation Controller.
Question27: Set up notifications for job completions in Automation Controller.
Question28: Use ansible_facts to display the OS distribution of web1.
Question29: Use ansible-inventory to validate the syntax of your static inventory.
Question30: Run a delegated task to back up a database on a different host.
Question31: Create a custom plugin for generating inventory.
Question32: Split a string into a list of words using a filter.
Question33: Check if a string starts with a specific prefix.
Question34: Validate the EE used in a job template.
Question35: Pull an EE from Automation Hub and use it in Automation Controller.
Question36: Create an advanced inventory that includes both static and dynamic sources.
Question37: Write a playbook to check if a string is alphanumeric.
Question38: Test if the EE has all required collections installed.
Question39: Test the connectivity of managed nodes from within the EE.
Question40: Test the machine credentials by connecting to a host.
Question41: Configure Automation Controller to authenticate with a private Git repository.
Question42: Validate the configuration of group_vars for web_servers.
Question43: Validate if a given variable contains a valid MAC address using a filter.
Question44: Run a playbook with a different Ansible configuration file in an EE.
Question45: Convert all keys in a dictionary to uppercase.
Question46: Write a playbook to execute tasks on a host only if the variable http_port is defined.
Question47: Stash uncommitted changes to the feature-update branch temporarily.
Question48: Add a group variable in an advanced inventory.
Question49: Configure a playbook to fail if the http_port variable is undefined for a host.
Question50: Analyze logs of an EE job run in Automation Controller.
Question51: Build the execution environment image using Podman.
Question52: Create a playbook that retrieves the value of http_port for all web_servers.
Question53: Create a static inventory with groups web and db, each containing two hosts.
Question55: Assign multiple EEs to a project in Automation Controller.
Question56: Set up a CI/CD pipeline to build and upload an EE.
Question57: Sort a list of numbers in descending order using a filter.
Question58: Create a playbook to compute the sum of a list of numbers.
Question59: Test Automation Controller integration with Automation Hub.
Question60: Configure Automation Controller to use custom inventory scripts.
Question61: Sync an AWS EC2 inventory plugin in Automation Controller.
Question62: Create a playbook to dynamically fetch and use host variables.
Question63: Add a custom script to the EE image.
Question64: Deploy an EE to Kubernetes for distributed execution.
Question65: Retrieve and display a list of available files in a directory using the lookup plugin.
Question66: Add documentation for your collection in a README.md file.
Question67: Create an inventory that uses AWS EC2 tags to group hosts.
Question69: Use failed_when to define custom failure conditions for a task.
Question70: Validate if a string matches a specific regular expression.
Question71: Install the collection locally from the .tar.gz file.
Question72: Filter a list of dictionaries to include only those with a specific key-value pair.
Question73: Test a custom inventory plugin.
Question75: Update an installed collection to the latest version.
Question76: Configure a playbook to use the inventory IP address directly and verify connectivity.
Question77: Write a playbook to execute a task based on a host's operating system version.
Question78: Extract all IP addresses from a list containing mixed data using a filter.
Question79: Find the longest string in a list using filters.
Question80: Use lookup with with_items to iterate over multiple external files.
Question83: Run a playbook on web1 with a specific ansible_connection type.
Question85: Secure the database credentials using Ansible Vault.
Question87: Push your changes from the feature-update branch to the remote repository.
Question89: Write a playbook to sort a dictionary by its values.
Question90: Set up web2 to use a proxy server for all Ansible tasks.
Question91: Extract all subnets from a list of CIDR notations using a filter.
Question92: Set up multiple environment inventories (dev and prod) with shared group variables.
Question93: Inspect the logs of an EE build process.
Question94: Set up a cron job to sync a dynamic inventory script periodically.
Question96: Run a command on the control node but store the result in the context of a managed host.
Question97: Validate the AWS inventory plugin.
Question99: Set up a database query as a dynamic inventory source.
Question101: Use delegation to restart a service on a specific host (db1) from a different host.
Question102: Create a directory structure for building an execution environment (EE).
Question103: Retrieve data from an environment variable using lookup.
Question106: Run a playbook with custom variables passed at runtime in Automation Controller.
Question107: Test if the EE has the required Python packages installed.
Question108: Publish the collection to a private Automation Hub repository.
Question109: Configure your Git username as Developer and email as [email protected] globally.
Question110: Clone a private repository using the source control credential.
Question112: Use the lookup plugin to read multiple lines from a file into a list.
Question113: Retrieve the hostname of a managed node using the ansible_hostname fact and display it.
Question114: Configure db1 to use a specific shell for commands via a host variable.
Question115: Create a playbook to skip tasks for hosts with ansible_distribution set to CentOS.
Question116: Write a test playbook to call the custom module hello.py.
Question118: Fetch the latest updates from the remote repository without merging them.
Question119: Merge the feature-update branch into the main branch to integrate the changes.
Question120: Automate the update process for EEs in Automation Controller.
Question121: Write a Dockerfile for building the EE.
Question122: Create an inventory plugin configuration for AWS.
Question123: Run a task on a different host than the one defined in the inventory using delegate_to.